x86 p2m: use common p2m ops in common p2m code path
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 7 Aug 2009 16:23:11 +0000 (17:23 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 7 Aug 2009 16:23:11 +0000 (17:23 +0100)
We found recently there was an assertion failure when EPT mode is
enabled on 32PAE host when debug=y is used. The patch attached fixes
that. It uses the common p2m ops in the
common p2m code path p2m_remove_page rather than calling
p2m_gfn_to_mfn() for only shadow mode.

Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com>
xen/arch/x86/mm/p2m.c

index 61c30d73231c917f4f07ea68a975b2e108a61ccd..91b148b2ddd4e61c0187268823bf83e05f177df1 100644 (file)
@@ -1882,7 +1882,7 @@ p2m_remove_page(struct domain *d, unsigned long gfn, unsigned long mfn,
 
     for ( i = 0; i < (1UL << page_order); i++ )
     {
-        mfn_return = p2m_gfn_to_mfn(d, gfn + i, &t, p2m_query);
+        mfn_return = d->arch.p2m->get_entry(d, gfn + i, &t, p2m_query);
         if ( !p2m_is_grant(t) )
             set_gpfn_from_mfn(mfn+i, INVALID_M2P_ENTRY);
         ASSERT( !p2m_is_valid(t) || mfn + i == mfn_x(mfn_return) );